<template>
	<view class="topic-nav">
		<view class="flex-sp-ac">
			<view>热门分类</view>
			<view class="flex-ac" @tap="OpenCategory()">更多
				<view class="icon iconfont icon-jinru"></view>
			</view>
		</view>
		<view class="flex-ac">
			<block v-for="(item,index) in nav" :key="index">
				<view>{{item.name}}</view>
			</block>
		</view>
	</view>
</template>

<script>
	export default{
		props:{
			nav:Array
		},
		methods:{
			OpenCategory(){
				uni.navigateTo({
					url:"../../pages/topic-category/topic-category"
				});
			}
		}
	}
</script>

<style scoped>
	/* 热门分类 begin */
	.topic-nav {
		border-bottom: 1rpx solid #EEEEEE;
		border-top: 1rpx solid #EEEEEE;
		padding: 20rpx;
	}
	
	.topic-nav>view:first-child {
		margin-bottom: 20rpx;
	}
	
	.topic-nav>view:first-child view:first-child {
		font-size: 30rpx;
	}
	
	.topic-nav>view:first-child view:last-child {
		color: #9e9e9e;
		font-size: 27rpx;
	}
	
	.topic-nav>view:first-child view:last-child view:last-child {
		margin-top: 5rpx;
	}
	
	.topic-nav>view:last-child view {
		flex: 1;
		margin: 0rpx 10rpx;
		font-size: 28rpx;
		background-color: #EEEEEE;
		color: #9E9E9E;
		padding: 15rpx 0;
		border-radius: 10rpx;
		text-align: center;
	}
	
	/* 热门分类 end */
</style>
